package com.zzh.partnersys.common.constant.redis;

/**
 * 用户相关常量
 *
 * @author zzh
 * @version 1.0
 */
public class UserConstant {
    /**
     * 用户登录状态
     */
    public static String USER_LOGIN_STATE = "userLoginState";

    /**
     * 用户存储推荐用户及用户列表key的前缀
     */
    public static String USER_CACHE_RECOMMEND_KEY = "partnerKing:user:recommend:";

    /**
     * 用户信息缓存key的前缀
     */
    public static String USER_CACHE_INFO_KEY = "partnerKing:user:info:";

    /**
     * 定时任务Redisson锁，保证一次执行
     */
    public static String USER_LOCK_JOB_RECOMMEND_KEY = "partnerKing:lock:recommendJob:";
    public static String USER_LOCK_JOB_TEAM_USER_MAP_KEY = "partnerKing:lock:teamIdUserIdJob:";

    /**
     * 邮箱注册的Redisson锁，保证一次执行（防止并发注册)
     */
    public static String USER_LOCK_REGISTER_EMAIL_KEY = "partnerKing:lock:register:email:";
    /**
     * 手机号注册的Redisson锁，保证一次执行（防止并发注册)
     */
    public static String USER_LOCK_REGISTER_PHONE_KEY = "partnerKing:lock:register:phone:";

    /**
     * 用户使用手机号发送验证码存储redis的key
     */
    public static String USER_LOCK_CODE_PHONE_KEY = "code:phone:";
    /**
     * 用户使用邮箱发送验证码存储redis的key
     */
    public static String USER_LOCK_CODE_EMAIL_KEY = "code:email:";

    /**
     * 用户地理位置用户key
     */
    public static String USER_CACHE_LOCATION_KEY = "partnerKing:findUser:location";

    //   ----------  权限  -----------
    /**
     * 默认权限
     */
    public static int DEFALUT_ROLE = 0;
    /**
     * 管理员权限
     */
    public static int ADMIN_ROLE = 1;
}

